import http from "@/utils/request";
function productLoadlist(page,per) {
    return http({
        method:'get',
      url: '/api/v1/products',
      params: { page:page,per:per },
    });
  }
  // 商品详情请求
  function detailRequest(id) {
    return http({
        method:'get',
      url: '/api/v1/products/'+id,
    });
  }
  function talkRequest(id) {
    return http({
        method:'get',
      url: '/api/v1/product_comments/'+id,
    });
  }
  function commentRequest(id,token,content,coverImage) {
    return http({
        method:'post',
      url: '/api/v1/product_comments/'+ id,
     headers:{token},
     data:{content,coverImage},
    });
  }
 
  export {productLoadlist,detailRequest,talkRequest,commentRequest}